package small.woods.msRedis.task;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import small.woods.msRedis.service.DistributedRedisLockService;

/**
 * @description: 式锁---redisson分布式
 * @author: yutingting
 * @create: 2022-01-19 09:54
 **/
@Component
@EnableScheduling
public class DistributedRedisLockTask {

    @Autowired
    DistributedRedisLockService distributedRedisLockService;

    @Scheduled(cron = "5,15,25,35,45,55 * * * * ? ")
    public void start(){
        distributedRedisLockService.executeDistributedRedisLock();
    }
}
